#include<bits/stdc++.h>
using namespace std;

typedef long long LL;

LL my_stoi(string str1){
    LL num = 0;
    string str;
    for(auto& chr: str1){
        if(chr!=',') str+=chr;
    }
    num = stoi(str.c_str());
    return num;
}

int main(){
    string str1, str2;
    while(cin>>str1 >> str2){
        LL a = my_stoi(str1);
        LL b = my_stoi(str2);
        cout<< a+b<<endl;
    }
    return 0;
}